package quartz.quartzdemo.config;

import org.quartz.impl.triggers.CronTriggerImpl;
import org.springframework.boot.autoconfigure.quartz.SchedulerFactoryBeanCustomizer;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.quartz.SchedulerFactoryBean;
import org.springframework.stereotype.Component;

@Configuration
public class SchedulerFactoryBeanCustomizerConfig implements SchedulerFactoryBeanCustomizer {
    @Override
    public void customize(SchedulerFactoryBean schedulerFactoryBean) {
        System.out.println("SchedulerFactoryBeanCustomizerConfig works");
       // schedulerFactoryBean.setTriggers(new CronTriggerImpl());
       schedulerFactoryBean.setOverwriteExistingJobs(true);
    }
}
